package com.zhuiyun.project.api.poetryAuthor.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhuiyun.project.utils.pageUtil.PageRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * @Description TODO 作者实体类
 * @Author shy
 * @Date 2023/12/11 8:42
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("poetry_author")
public class PoetryAuthor {
    /*
    id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)  //id主键递增
    private Integer authorId;
    /*
    作者名
     */
    private String authorName;
    /*
    作者简介
     */
    private String authorIntroduction;
    /*
    所属朝代
     */
    private Integer authorDynasty;
    /*
    创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )//DateTimeFormat 是入参格式化；
    private Date creationTime;
    /*
    修改时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )//DateTimeFormat 是入参格式化；
    private Date updateTime;
    /*
    是否删除
     */
    private Integer delFlag;
}